Feature gate for defaulted associated type_consts with associated_type_defaults #152385
Conversation
|
r? @TaKO8Ki rustbot has assigned @TaKO8Ki. Use Why was this reviewer chosen?The reviewer was selected based on:
|
|
r? BoxyUwU |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
1867a9d to
f85e72b
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@rustbot author |
|
Reminder, once the PR becomes ready for a review, use |
This comment has been minimized.
This comment has been minimized.
|
Some changes occurred in tests/ui/sanitizer cc @rcvalle |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@rustbot ready |
|
@BoxyUwU hey, just checking in on the status of the PR. Are there any issues with it that I need to resolve or is it all good? |
|
fmease's reviews are good 😌 we can merge after they're dealt with :) |
02fca73 to
84140cf
Compare
|
Is this fine? Anything else to be done? |
|
As per
@bors r=BoxyUwU rollup |
…, r=BoxyUwU Feature gate for defaulted associated type_consts with associated_type_defaults *[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152385)* This PR for issue rust-lang#130288 extends a feature gate that was already present for defaulted associated types to defaulted type consts under associated_type_defaults. Code added: ``` if ctxt == AssocCtxt::Trait && rhs.is_some() { gate!( &self, associated_type_defaults, i.span, "associated type defaults are unstable" ); } ``` Error produced: ``` error[E0658]: associated type defaults are unstable --> $DIR/type-const-associated-default.rs:4:5 | LL | type const N: usize = 10; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue rust-lang#29661 <rust-lang#29661> for more information = help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/type-const-associated-default.rs:1:12 | LL | #![feature(min_generic_const_args)] | ^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue rust-lang#132980 <rust-lang#132980> for more information = note: `#[warn(incomplete_features)]` on by default error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0658`. ``` Thanks to @BoxyUwU for the guidance on this issue.
…, r=BoxyUwU Feature gate for defaulted associated type_consts with associated_type_defaults *[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152385)* This PR for issue rust-lang#130288 extends a feature gate that was already present for defaulted associated types to defaulted type consts under associated_type_defaults. Code added: ``` if ctxt == AssocCtxt::Trait && rhs.is_some() { gate!( &self, associated_type_defaults, i.span, "associated type defaults are unstable" ); } ``` Error produced: ``` error[E0658]: associated type defaults are unstable --> $DIR/type-const-associated-default.rs:4:5 | LL | type const N: usize = 10; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue rust-lang#29661 <rust-lang#29661> for more information = help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/type-const-associated-default.rs:1:12 | LL | #![feature(min_generic_const_args)] | ^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue rust-lang#132980 <rust-lang#132980> for more information = note: `#[warn(incomplete_features)]` on by default error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0658`. ``` Thanks to @BoxyUwU for the guidance on this issue.
…uwer Rollup of 8 pull requests Successful merges: - #149366 (GVN: consider constants of primitive types as deterministic) - #152779 (Clarify aspects of query macros) - #152958 (`rustc_queries` simplifications) - #152385 (Feature gate for defaulted associated type_consts with associated_type_defaults ) - #152708 (Build: Add `stdenv.cc.cc.lib` to Nix dependencies) - #152921 (Add build.rustdoc option to bootstrap config) - #152926 (Fix ICE when an associated type is wrongly marked as `final`) - #152927 (Index expressions rendered the index: subexpression as the id, instea…)
…uwer Rollup of 7 pull requests Successful merges: - #152779 (Clarify aspects of query macros) - #152958 (`rustc_queries` simplifications) - #152385 (Feature gate for defaulted associated type_consts with associated_type_defaults ) - #152708 (Build: Add `stdenv.cc.cc.lib` to Nix dependencies) - #152921 (Add build.rustdoc option to bootstrap config) - #152926 (Fix ICE when an associated type is wrongly marked as `final`) - #152927 (Index expressions rendered the index: subexpression as the id, instea…)
Rollup merge of #152385 - LaneAsade:gate-type-const-defaults, r=BoxyUwU Feature gate for defaulted associated type_consts with associated_type_defaults *[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/rust/pull/152385)* This PR for issue #130288 extends a feature gate that was already present for defaulted associated types to defaulted type consts under associated_type_defaults. Code added: ``` if ctxt == AssocCtxt::Trait && rhs.is_some() { gate!( &self, associated_type_defaults, i.span, "associated type defaults are unstable" ); } ``` Error produced: ``` error[E0658]: associated type defaults are unstable --> $DIR/type-const-associated-default.rs:4:5 | LL | type const N: usize = 10; | ^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #29661 <#29661> for more information = help: add `#![feature(associated_type_defaults)]` to the crate attributes to enable = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date warning: the feature `min_generic_const_args` is incomplete and may not be safe to use and/or cause compiler crashes --> $DIR/type-const-associated-default.rs:1:12 | LL | #![feature(min_generic_const_args)] | ^^^^^^^^^^^^^^^^^^^^^^ | = note: see issue #132980 <#132980> for more information = note: `#[warn(incomplete_features)]` on by default error: aborting due to 1 previous error; 1 warning emitted For more information about this error, try `rustc --explain E0658`. ``` Thanks to @BoxyUwU for the guidance on this issue.
View all comments
This PR for issue #130288 extends a feature gate that was already present for defaulted associated types to defaulted type consts under associated_type_defaults.
Code added:
Error produced:
Thanks to @BoxyUwU for the guidance on this issue.